﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using F_MODEL;
using F_BLL;


namespace MvcApplication1.Controllers
{
    public class CarryGargoController : zyl_LoginController
    {
        CarryGargo_bll bll = new CarryGargo_bll();
        /// <summary>
        /// 带货
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public List<Temp> AllList()
        {
            UserInfo m = new UserInfo();
            int userid = 0;
            m = mod();
            if (m != null)
                userid = m.userId;
           
            List<Temp> list = bll.AllList(userid);
            return list;
        }

        /// <summary>
        /// 领取代金券
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="mon"></param>
        /// <returns></returns>
        [HttpGet]
        public int getcou(int mon)
        {
            int userid = 0;
            UserInfo m = new UserInfo();
            m = mod();
            if (m != null)
                userid = m.userId;
            int nn = bll.getcou(userid,mon);
            return nn;
        }


    }
}
